Update the project and Eliminate warnings#3
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request aims to eliminate compiler warnings across the codebase while making targeted updates to the project configuration and structure. The changes focus on improving code quality through proper type handling, removing unused variables, and updating third-party certificates.
Key changes:
- Updated TLS root certificates for secure HTTPS connections
- Fixed type mismatches and casting issues in various modules
- Removed unused variables and declarations to eliminate compiler warnings
Reviewed Changes
Copilot reviewed 15 out of 22 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| minilcd_sample.c | Changed function signature from static void to int with return statement |
| lcdfont.h | Removed entire font data file (543 lines of ASCII and Chinese font arrays) |
| lcd.c | Removed unused Chinese and ASCII text rendering functions and font header include |
| tls_certificate.c | Updated root certificate chain with newer DigiCert certificates |
| lv_draw_vg_lite.c | Fixed misplaced include directive location |
| xiaozhi_audio.c | Added error checking for opus decode operation |
| xiaozhi.h | Changed session_id type from uint8_t to char; externalized button event variable |
| xiaozhi.c | Fixed type casts, externalized function declarations, removed unused variables, renamed global event variable |
| adc.c | Removed unused tmp buffer variable |
| README files | Added WiFi configuration instructions with code examples and screenshots |
| viv_dc_options.h | Commented out MEM_SIZE definition |
| drv_pdm.c | Removed stray backslash character |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #define BLK GET_PIN(13,7) | ||
|
|
||
| static void minilcd_test() | ||
| int minilcd_test(void) |
There was a problem hiding this comment.
[nitpick] The function signature was changed from static void to int and now returns 0, but the return value is never checked by the caller INIT_APP_EXPORT. Consider whether this return value serves a meaningful purpose or if the function should remain void to match the expected signature pattern for initialization functions.
| cJSON *payload = cJSON_GetObjectItem(root, "payload"); | ||
| if (payload && cJSON_IsObject(payload)) | ||
| { | ||
| extern void McpServer_ParseMessage(const char* message); |
There was a problem hiding this comment.
The extern function declaration should be moved to a header file rather than being declared locally within the function. This improves maintainability and ensures consistent declarations across translation units.
| if (my_ota_version) | ||
| { | ||
| http_xiaozhi_data_parse_ws(my_ota_version); | ||
| extern void iot_initialize(void); |
There was a problem hiding this comment.
The extern function declaration should be moved to a header file rather than being declared locally within the function. This improves maintainability and ensures consistent declarations across translation units.
| #include "lv_vg_lite_pending.h" | ||
| #include "lv_vg_lite_stroke.h" | ||
|
|
||
| #include "lv_draw_vg_lite.h" |
There was a problem hiding this comment.
The include directive #include \"lv_draw_vg_lite.h\" should be placed at the top of the file with other includes (before line 23) rather than after them. Standard practice is to group all includes together at the beginning of the source file.
| #include "lv_draw_vg_lite.h" | |
| #include "lv_draw_vg_lite.h" |
No description provided.